<?php
include_once("clases/Conexion.php");
include_once("clases/MarcadorManager.php");

$link = new Conexion("localhost", "root", "root", "menues");
$objmarcador = new MarcadorManager();
$array_marcadores = $objmarcador->getMarcador($_GET['id']);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="css/style.css" rel="stylesheet" type="text/css"  />
        <script type="text/javascript" src="./js/jquery.easing.1.3.js"></script>
        <script type="text/javascript" src="./js/cargarCombo.js"></script>
        <script type="text/javascript" src="./js/jquery-latest.js"></script>
        <link rel="stylesheet" href="css/thickbox.css" type="text/css" />
        <script type="text/javascript" src="./js/thickbox.js"></script>
        <script type="text/javascript" src="./js/validarFormularioMarcadores.js"></script>
    </head>

    <body onload="">
        <center>
            <fieldset>
                <legend>Editar Marcador</legend>
                <form name="frmmarcador" method="post" action="index.php?accion=updateMarcador">
                   
                    <table id="TablaItemSubmenu" align="center">
                        <tr>
                            <td>
                                <label>Categoria del Marcador:</label>
                            </td>
                            <td>
                                <input type="text" name="categoria" disabled="true" value="<? echo str_replace('_',' ',$array_marcadores[0]['category']) ?>"/>
                                <input type="hidden" name="id" value="<? echo $array_marcadores[0]['id']?>"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>Titulo:</label>
                            </td>
                            <td>
                                <input type="text" name="titulo" id="titulo" value="<?php echo $array_marcadores[0]['title'] ?>"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>Latitud:</label>
                            </td>
                            <td>
                                <input type="text" id="latitud" name="latitud" value="<?php echo $array_marcadores[0]['lat'] ?>"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>Longitud:</label>
                            </td>
                            <td>
                                <input type="text" name="longitud" id="longitud" value="<?php echo $array_marcadores[0]['lng'] ?>"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>url</label>
                            </td>
                            <td>
                                <input type="text" name="url" id="url" value="<?php echo $array_marcadores[0]['url'] ?>"/>
                            </td>
                        </tr>
                        <tr>
                                <td>
                                <label>Contenido</label>
                            </td>
                            <td>
                                <textarea cols="20" rows="3" name="contenido">
                                        <?php echo $array_marcadores[0]['contenido'] ?>
                                </textarea>
                            </td>
                        </tr>
                    </table><br/><br/>
                    <input type="button" name="btnregresar" value=":: REGRESAR ::" onclick="javascript:self.parent.tb_remove('M');" />
                    <input type="button" name="btngrabar" value=":: ACTUALIZAR ::" onclick="javascript:validarFormMarcador('M');"/><br/><br/>
                </form>
            </fieldset>
        </center>
    </body>
</html>